<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>循环案例</title>
    <script>
        var one = 0
        var three = 0
        var four = 0
        for (var i = 1; i <= 100; i++) {
            one += i
            if (i % 2 == 0) {
                three += i
            }
            if (i % 7 == 0) {
                four += i
            }
        }
        var two = one / 100;
        console.log(one);
        console.log(two);
        console.log(three);
        console.log(four);
        console.log('------------');

        var five = '';
        for (var i = 1; i <= 4; i++) {
            for (var j = 1; j <= 5; j++) {
                five += ' @'
            }
            five += '\n'
        }
        console.log(five);
        console.log('------------');

        var six = '';
        for (var i = 1; i <= 5; i++) {
            for (var j = 1; j <= i; j++) {
                six += ' @'
            }
            six += '\n'
            six += '\n'
        }
        console.log(six);
        console.log('------------');


        var seven = '';
        for (var i = 1; i <= 9; i++) {
            for (var j = 1; j <= i; j++) {
                seven += i + 'x' + j + '=' + i * j + '\t';
            }
            seven += '\n'
        }
        console.log(seven);
        console.log('------------');


        do {
            var eight = prompt('请输入用户名：')
            var ten = prompt('请输入密码：')
        }
        while (eight !== 'admin', ten !== '123456')
        alert('登陆成功')
        console.log('------------');

        var sum = 0;
        for (var i = 1; i <= 100; i++) {
            if (i % 10 ==3) {
                continue
            }
            sum += i ;
        }
        console.log(sum);
    </script>
</head>

<body>

</body>

</html>